Javascript Function

Description

The 'Javascript Function' option allows you to specify the name of a Javascript function. This function must return an array of JSON objects that contain the data for the List.

Discussion

When you choose this option, you must specify the name of the Javascript function as well as a list of columns that the List has.

For example, assume that you specify that the List has these columns:

Firstname,Lastname,City

Your Javascipt function could then be defined as follows:

function getListData() {
    var data = [
        {Firstname: 'Jim', Lastname: 'Smith', City: 'Boston'},
        {Firstname: 'Cecelia', Lastname: 'Dawkins', City: 'Denver'}
    ];
    return data;
}